// 批量导入assets/emojis目录下的所有图片
const emojiModules = import.meta.glob('@/assets/images/emojis/*.png', { eager: true })

// 转换为键值对格式
const emojiMap = Object.entries(emojiModules).reduce((acc, [path, module]) => {
  const fileName = path.replace(/(.*\/)?([^/]+)\.png$/, '$2')
  acc[fileName] = (module as any).default
  return acc
}, {} as Record<string, string>)

export default emojiMap